package com.ruoyi.project.system.service.impl;

import java.util.List;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.system.mapper.SysUserStoreMapper;
import com.ruoyi.project.system.domain.SysUserStore;
import com.ruoyi.project.system.service.ISysUserStoreService;

/**
 * 用户和店仓关联Service业务层处理
 *
 * @author anan
 * @date 2021-05-05
 */
@Service
public class SysUserStoreServiceImpl extends ServiceImpl<SysUserStoreMapper,SysUserStore> implements ISysUserStoreService
{
    @Autowired
    private SysUserStoreMapper sysUserStoreMapper;

    /**
     * 查询用户和店仓关联
     *
     * @param userId 用户和店仓关联ID
     * @return 用户和店仓关联
     */
    @Override
    public SysUserStore selectSysUserStoreById(Long userId)
    {
        return sysUserStoreMapper.selectSysUserStoreById(userId);
    }

    /**
     * 查询用户和店仓关联列表
     *
     * @param sysUserStore 用户和店仓关联
     * @return 用户和店仓关联
     */
    @Override
    public List<SysUserStore> selectSysUserStoreList(SysUserStore sysUserStore)
    {
        return sysUserStoreMapper.selectSysUserStoreList(sysUserStore);
    }

    /**
     * 新增用户和店仓关联
     *
     * @param sysUserStore 用户和店仓关联
     * @return 结果
     */
    @Override
    public int insertSysUserStore(SysUserStore sysUserStore)
    {
        return sysUserStoreMapper.insertSysUserStore(sysUserStore);
    }

    /**
     * 修改用户和店仓关联
     *
     * @param sysUserStore 用户和店仓关联
     * @return 结果
     */
    @Override
    public int updateSysUserStore(SysUserStore sysUserStore)
    {
        return sysUserStoreMapper.updateSysUserStore(sysUserStore);
    }

    /**
     * 批量删除用户和店仓关联
     *
     * @param userIds 需要删除的用户和店仓关联ID
     * @return 结果
     */
    @Override
    public int deleteSysUserStoreByIds(Long[] userIds)
    {
        return sysUserStoreMapper.deleteSysUserStoreByIds(userIds);
    }

    /**
     * 删除用户和店仓关联信息
     *
     * @param userId 用户和店仓关联ID
     * @return 结果
     */
    @Override
    public int deleteSysUserStoreById(Long userId)
    {
        return sysUserStoreMapper.deleteSysUserStoreById(userId);
    }
}